<me:UIVKPOS x:Class="WPFExcelReport.TSMVKART"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
    xmlns:me="clr-namespace:WPFExcelReport"  
    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"   
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIVKPOS.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:BM2YD x:Key="BM2YD"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:PreisConverter  x:Key="price"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVKPOS.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <WrapPanel>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=单}}"/>
            <ex:TXT72  MaxLength="2" PRE="  "  Text="{Binding KRS,ElementName=TV}" Width="40"/>
            <ex:TXT72 MaxLength="6" PRE="000000" Text="{Binding LFD,ElementName=TV}" Width="80"/>
            <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=品种}}"/>
            <TextBlock Grid.Column="1" Text="{Binding ART,ElementName=TV}" Width="60"/> 
            <Button Grid.Column="0" Height="20"  Width="24" Margin="0,0,0,0" Click="QueryCommand" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>  
        </WrapPanel>
        <DataGrid Grid.Row="1" 
                  AutoGenerateColumns="False" 
                  EnableRowVirtualization="False" 
                  Name="dlgMaster"
                  MaxHeight="400"
                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                  HeadersVisibility="Column"  CanUserReorderColumns="True" CanUserResizeRows="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"
                  Width="Auto" Height="Auto" 
                  EnableColumnVirtualization="True" 
                  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=VKPAUFKRS}" Header="" Width="Auto" MinWidth="24" />
                <DataGridTextColumn Binding="{Binding Path=VKPAUFLFD}" Header="{Binding Source={Localization:Translate Word=销售单}}" Width="Auto" MinWidth="30" /> 
                <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="{Binding Source={Localization:Translate Word=面料}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=VKPKDKOMM}" Header="{Binding Source={Localization:Translate Word=合同}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=KDKUNDNA,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=客户}}" Width="Auto" MinWidth="30" /> 
            </DataGrid.Columns>
        </DataGrid>
        <TXT:TXTTP Grid.Row="2" IsAuto="True" 
                               Name="cT"
                              TART="VKT" 
                              SIND="{Binding TXTISIND,ElementName=TV}"  
                              PIND="{Binding PIND,ElementName=TV}"                              
                              VerticalAlignment="Top"/>
    </Grid>
</me:UIVKPOS>
